﻿@using Nop.Web.Framework.Models.AdminAreaTour
@inject Nop.Services.Stores.IStoreService storeService
@inject Nop.Services.Messages.IEmailAccountService emailAccountService
@inject Nop.Services.Topics.ITopicService topicService

@{
    var showTour = ViewBag.ShowTour ?? false;
}

@if (showTour && await workContext.GetCurrentVendorAsync() is null)
{
    <link rel="stylesheet" href="~/lib_npm/shepherd.js/css/shepherd.css" />
    <script src="~/lib_npm/shepherd.js/js/shepherd.min.js"></script>
    <script src="~/js/admintour/admin.tour.common.js"></script>

    int? entityId = null;
    var tourStep = (TourStep)ViewBag.TourStep;
    switch (tourStep)
    {
        case TourStep.GeneralSettings:
            entityId = (await storeService.GetAllStoresAsync()).FirstOrDefault()?.Id ?? 0;

            <script asp-exclude-from-bundle="true" asp-location="Footer" src="~/js/admintour/admin.tour.generalsettings.js"></script>
            <script asp-location="Footer">
                var localized_data = {
                    PersonalizeStoreIntroTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PersonalizeStore.Intro.Title").Text)',
                    PersonalizeStoreIntroText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PersonalizeStore.Intro.Text").Text)',

                    PersonalizeStoreBasicAdvancedTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PersonalizeStore.BasicAdvanced.Title").Text)',
                    PersonalizeStoreBasicAdvancedText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PersonalizeStore.BasicAdvanced.Text").Text)',

                    PersonalizeStoreThemeTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PersonalizeStore.Theme.Title").Text)',
                    PersonalizeStoreThemeText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PersonalizeStore.Theme.Text", OfficialSite.Themes + Utm.OnAdminTour, Docs.Themes + Utm.OnAdminTourDocs).Text)',

                    PersonalizeStoreLogoTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PersonalizeStore.Logo.Title").Text)',
                    PersonalizeStoreLogoText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PersonalizeStore.Logo.Text").Text)',
                };
            </script>
            break;

        case TourStep.Store:

            <script asp-exclude-from-bundle="true"  src="~/js/admintour/admin.tour.store.js" asp-location="Footer"></script>
            <script asp-location="Footer">
                var localized_data = {
                    Back: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Back").Text)',
                    NextStep: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.NextStep").Text)',
                    NextPage: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.NextPage").Text)',

                    StoreNameTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Store.Name.Title").Text)',
                    StoreNameText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Store.Name.Text").Text)',

                    StoreUrlTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Store.Url.Title").Text)',
                    StoreUrlText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Store.Url.Text").Text)',

                    StoreSslTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Store.Ssl.Title").Text)',
                    StoreSslText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Store.Ssl.Text", Docs.SslInstall + Utm.OnAdminTourDocs).Text)',
                };
            </script>
            break;

        case TourStep.ShippingProviders:

            <script asp-exclude-from-bundle="true" src="~/js/admintour/admin.tour.shippingproviders.js" asp-location="Footer"></script>
            <script asp-location="Footer">
                var localized_data = {
                    ShippingProvidersProvidersTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ShippingProviders.Providers.Title").Text)',
                    ShippingProvidersProvidersText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ShippingProviders.Providers.Text", OfficialSite.ShippingPlugins + Utm.OnAdminTourDocs.Replace('?', '&')).Text)',

                    ShippingProvidersManualTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ShippingProviders.Manual.Title").Text)',
                    ShippingProvidersManualText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ShippingProviders.Manual.Text").Text)',
                    
                    ShippingProvidersActivateTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ShippingProviders.Activate.Title").Text)',
                    ShippingProvidersActivateText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ShippingProviders.Activate.Text").Text)',

                    ShippingProvidersConfigureTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ShippingProviders.Configure.Title").Text)',
                    ShippingProvidersConfigureText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ShippingProviders.Configure.Text").Text)',
                };
            </script>
            break;

        case TourStep.ShippingManual:

            <script asp-exclude-from-bundle="true" src="~/js/admintour/admin.tour.shippingmanual.js" asp-location="Footer"></script>
            <script asp-location="Footer">
                var localized_data = {
                    ConfigureManualSwitchTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ConfigureManual.Switch.Title").Text)',
                    ConfigureManualSwitchText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ConfigureManual.Switch.Text").Text)',

                    ConfigureManualFixedRateTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ConfigureManual.FixedRate.Title").Text)',
                    ConfigureManualFixedRateText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ConfigureManual.FixedRate.Text").Text)',

                    ConfigureManualByWeightTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ConfigureManual.ByWeight.Title").Text)',
                    ConfigureManualByWeightText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ConfigureManual.ByWeight.Text").Text)',

                    ConfigureManualMethodsTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ConfigureManual.Methods.Title").Text)',
                    ConfigureManualMethodsText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ConfigureManual.Methods.Text").Text)',

                    ConfigureManualEditTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ConfigureManual.Edit.Title").Text)',
                    ConfigureManualEditText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ConfigureManual.Edit.Text").Text)',

                    ConfigureManualManageTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ConfigureManual.Manage.Title").Text)',
                    ConfigureManualManageText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.ConfigureManual.Manage.Text").Text)',
                };
            </script>
            break;

        case TourStep.PaymentMethods:

            <script asp-exclude-from-bundle="true" src="~/js/admintour/admin.tour.paymentmethods.js" asp-location="Footer"></script>
            <script asp-location="Footer">
                var localized_data = {
                    PaymentMethodsPaymentMethodsTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PaymentMethods.PaymentMethods.Title").Text)',
                    PaymentMethodsPaymentMethodsText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PaymentMethods.PaymentMethods.Text").Text)',

                    PaymentMethodsCheckMoneyTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PaymentMethods.CheckMoney.Title").Text)',
                    PaymentMethodsCheckMoneyText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PaymentMethods.CheckMoney.Text").Text)',

                    PaymentMethodsManualTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PaymentMethods.Manual.Title").Text)',
                    PaymentMethodsManualText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PaymentMethods.Manual.Text").Text)',

                    PaymentMethodsPayPalTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PaymentMethods.PayPal.Title").Text)',
                    PaymentMethodsPayPalText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PaymentMethods.PayPal.Text", Docs.PayPal + Utm.OnAdminTourDocs).Text)',

                    PaymentMethodsActivateTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PaymentMethods.Activate.Title").Text)',
                    PaymentMethodsActivateText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PaymentMethods.Activate.Text").Text)',

                    PaymentMethodsConfigureTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PaymentMethods.Configure.Title").Text)',
                    PaymentMethodsConfigureText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.PaymentMethods.Configure.Text").Text)',
                };
            </script>
            break;

        case TourStep.TaxProviders:

            <script asp-exclude-from-bundle="true" src="~/js/admintour/admin.tour.taxproviders.js" asp-location="Footer"></script>
            <script asp-location="Footer">
                var localized_data = {
                    TaxProvidersTaxProvidersTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxProviders.TaxProviders.Title").Text)',
                    TaxProvidersTaxProvidersText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxProviders.TaxProviders.Text", OfficialSite.TaxPlugins + Utm.OnAdminTourDocs.Replace('?', '&')).Text)',

                    TaxProvidersAvalaraTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxProviders.Avalara.Title").Text)',
                    TaxProvidersAvalaraText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxProviders.Avalara.Text", Docs.Avalara + Utm.OnAdminTourDocs).Text)',

                    TaxProvidersManualTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxProviders.Manual.Title").Text)',
                    TaxProvidersManualText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxProviders.Manual.Text").Text)',

                    TaxProvidersPrimaryProviderTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxProviders.PrimaryProvider.Title").Text)',
                    TaxProvidersPrimaryProviderText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxProviders.PrimaryProvider.Text").Text)',

                    TaxProvidersConfigureTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxProviders.Configure.Title").Text)',
                    TaxProvidersConfigureText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxProviders.Configure.Text").Text)',
                };
            </script>
            break;

        case TourStep.TaxManual:

            <script asp-exclude-from-bundle="true" src="~/js/admintour/admin.tour.taxmanual.js" asp-location="Footer"></script>
            <script asp-location="Footer">
                var localized_data = {
                    TaxManualSwitchTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxManual.Switch.Title").Text)',
                    TaxManualSwitchText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxManual.Switch.Text").Text)',

                    TaxManualFixedTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxManual.Fixed.Title").Text)',
                    TaxManualFixedText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxManual.Fixed.Text").Text)',

                    TaxManualByCountryTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxManual.ByCountry.Title").Text)',
                    TaxManualByCountryText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxManual.ByCountry.Text").Text)',

                    TaxManualCategoriesTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxManual.Categories.Title").Text)',
                    TaxManualCategoriesText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxManual.Categories.Text").Text)',

                    TaxManualEditTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxManual.Edit.Title").Text)',
                    TaxManualEditText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TaxManual.Edit.Text").Text)',
                };
            </script>
            break;

        case TourStep.Product:

            <script asp-exclude-from-bundle="true" src="~/js/admintour/admin.tour.product.js" asp-location="Footer"></script>
            <script asp-location="Footer">
                var localized_data = {
                    ProductSettingsButtonTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.SettingsButton.Title").Text)',
                    ProductSettingsButtonText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.SettingsButton.Text").Text)',

                    ProductDetailsTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.Details.Title").Text)',
                    ProductDetailsText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.Details.Text").Text)',

                    ProductPriceTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.Price.Title").Text)',
                    ProductPriceText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.Price.Text", Docs.Currencies + Utm.OnAdminTourDocs).Text)',

                    ProductTaxTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.Tax.Title").Text)',
                    ProductTaxText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.Tax.Text").Text)',

                    ProductShippingTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.Shipping.Title").Text)',
                    ProductShippingText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.Shipping.Text").Text)',

                    ProductInventoryTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.Inventory.Title").Text)',
                    ProductInventoryText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.Inventory.Text").Text)',

                    ProductPicturesTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.Pictures.Title").Text)',
                    ProductPicturesText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Product.Pictures.Text").Text)',
                };
            </script>
            break;

        case TourStep.EmailAccountList:
            entityId = (await emailAccountService.GetAllEmailAccountsAsync()).FirstOrDefault()?.Id ?? 0;

            <script asp-exclude-from-bundle="true" src="~/js/admintour/admin.tour.emailaccountlist.js" asp-location="Footer"></script>
            <script asp-location="Footer">
                var localized_data = {
                    EmailAccountListEmailAccounts1Title: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccountList.EmailAccounts1.Title").Text)',
                    EmailAccountListEmailAccounts1Text: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccountList.EmailAccounts1.Text").Text)',

                    EmailAccountListEmailAccounts2Title: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccountList.EmailAccounts2.Title").Text)',
                    EmailAccountListEmailAccounts2Text: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccountList.EmailAccounts2.Text").Text)',

                    EmailAccountListDefaultEmailAccountTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccountList.DefaultEmailAccount.Title").Text)',
                    EmailAccountListDefaultEmailAccountText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccountList.DefaultEmailAccount.Text").Text)',

                    EmailAccountListEditTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccountList.Edit.Title").Text)',
                    EmailAccountListEditText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccountList.Edit.Text").Text)',
                };
            </script>
            break;

        case TourStep.EmailAccount:

            <script asp-exclude-from-bundle="true" src="~/js/admintour/admin.tour.emailaccount.js" asp-location="Footer"></script>
            <script asp-location="Footer">
                var localized_data = {
                    EmailAccountEmailAddressTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.EmailAddress.Title").Text)',
                    EmailAccountEmailAddressText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.EmailAddress.Text").Text)',

                    EmailAccountDisplayNameTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.DisplayName.Title").Text)',
                    EmailAccountDisplayNameText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.DisplayName.Text").Text)',

                    EmailAccountHostTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.Host.Title").Text)',
                    EmailAccountHostText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.Host.Text").Text)',

                    EmailAccountPortTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.Port.Title").Text)',
                    EmailAccountPortText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.Port.Text").Text)',

                    EmailAccountUsernameTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.Username.Title").Text)',
                    EmailAccountUsernameText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.Username.Text").Text)',

                    EmailAccountPasswordTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.Password.Title").Text)',
                    EmailAccountPasswordText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.Password.Text").Text)',

                    EmailAccountUseSslTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.UseSsl.Title").Text)',
                    EmailAccountUseSslText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.UseSsl.Text").Text)',

                    EmailAccountDefaultCredentialsTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.DefaultCredentials.Title").Text)',
                    EmailAccountDefaultCredentialsText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.DefaultCredentials.Text").Text)',

                    EmailAccountTestEmailTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.TestEmail.Title").Text)',
                    EmailAccountTestEmailText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.EmailAccount.TestEmail.Text").Text)',
                };
            </script>
            break;

        case TourStep.TopicList:
            entityId = (await topicService.GetTopicBySystemNameAsync("ShippingInfo"))?.Id ?? 0;

            <script asp-exclude-from-bundle="true" src="~/js/admintour/admin.tour.topiclist.js" asp-location="Footer"></script>
            <script asp-location="Footer">
                var localized_data = {
                    Done: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Done").Text)',

                    TopicListTopics1Title: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TopicList.Topics1.Title").Text)',
                    TopicListTopics1Text: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TopicList.Topics1.Text").Text)',

                    TopicListTopics2Title: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TopicList.Topics2.Title").Text)',
                    TopicListTopics2Text: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TopicList.Topics2.Text").Text)',

                    TopicListShippingTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TopicList.Shipping.Title").Text)',
                    TopicListShippingText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TopicList.Shipping.Text").Text)',

                    TopicListLocationTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TopicList.Location.Title").Text)',
                    TopicListLocationText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TopicList.Location.Text").Text)',

                    TopicListEditTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TopicList.Edit.Title").Text)',
                    TopicListEditText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.TopicList.Edit.Text").Text)',
                };
            </script>
            break;

        case TourStep.Topic:

            <script asp-exclude-from-bundle="true" src="~/js/admintour/admin.tour.topic.js" asp-location="Footer"></script>
            <script asp-location="Footer">
                var localized_data = {
                    Done: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Done").Text)',

                    TopicTitleContentTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Topic.TitleContent.Title").Text)',
                    TopicTitleContentText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Topic.TitleContent.Text").Text)',

                    TopicPreviewTitle: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Topic.Preview.Title").Text)',
                    TopicPreviewText: '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Topic.Preview.Text").Text)',
                };
            </script>
            break;

        default:
            break;
    }

    <script asp-location="Footer">
        localized_data.Back = '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.Back").Text)';
        localized_data.NextStep = '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.NextStep").Text)';
        localized_data.NextPage = '@JavaScriptEncoder.Default.Encode(T("Admin.ConfigurationSteps.NextPage").Text)';

        AdminTourDataProvider.init(localized_data, @entityId);
    </script>
}

